/**
 * 获取借款用途 and 车辆购买方式枚举型
 * @type {{}}
 */
var buyModeAndLoanUse = {};
buyModeAndLoanUse.getBuyMode = function() { // 车辆购买方式
    Webapp.postLoadData('/business.do', {
        'method': 'listDist',
        'datatype':'BuyMode'
    }, function (data) {
        if (data) {
            var buyMode = '<option value="" selected="true" disabled="true">车辆购买方式</option>',
                resultList = data.result;
            for (var i in resultList) {
                buyMode += '<option value="'+resultList[i].datacode+'">' + resultList[i].datavalue + '</option>';
            }
            $('#selectTypeValue').html(buyMode);
        }
    }, function(e) {})
};
buyModeAndLoanUse.getLoanUse = function() { // 借款用途
    Webapp.postLoadData('/business.do', {
        'method': 'listDist',
        'datatype':'LoanUse'
    }, function (data) {
        if (data) {
            var loanUse = '<option value="" selected="true" disabled="true">借款用途</option>',
                resultList = data.result;
            for (var n in resultList) {
                loanUse += '<option value="'+resultList[n].datacode+'">' + resultList[n].datavalue + '</option>';
            }
            $('#selectValue').html(loanUse);
        }
    }, function(e) {});
};
buyModeAndLoanUse.getBuyMode();
buyModeAndLoanUse.getLoanUse();
